package com.cyn.aframework.utils;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class ReflectUtils {


    public static<T> T getResult(Object object, String methodName, Object dtoClz) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
        Method m = object.getClass().getDeclaredMethod(methodName, dtoClz.getClass());
        T f = (T) m.invoke(object, dtoClz);
        return f;
    }
}
